//
//  LGHomeTableViewCell.m
//  ligenyun
//
//  Created by apple on 2018/3/23.
//  Copyright © 2018年 stoneobs@icloud.com. All rights reserved.
//

#import "LGCiTangMangeTableViewCell.h"

@interface LGCiTangMangeTableViewCell ()
@property(nonatomic, strong) STButton     *iconButton;
@property(nonatomic, strong) STLabel     *titleLable;
@property(nonatomic, strong) STLabel     *desLable;
@property(nonatomic, strong) STLabel     *timeLable;
@end
@implementation LGCiTangMangeTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if (self == [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self configSubView];
    }
    return self;
}
+ (CGFloat)cellHeight{
    return 120;
}
#pragma mark --SubView
- (void)configSubView{
    self.iconButton = [[STButton alloc] initWithFrame:CGRectMake(15, 10, 85, 85)
                                                title:nil
                                           titleColor:nil
                                            titleFont:0
                                         cornerRadius:0
                                      backgroundColor:nil
                                      backgroundImage:[UIImage imageNamed:@"1"]
                                                image:nil];
    [self addSubview:self.iconButton];
    
    STLabel * titleLable = [[STLabel alloc] initWithFrame:CGRectMake(self.iconButton.right + 10,10, UIScreenWidth - self.iconButton.right, 20)
                                                     text:@"陈家祠堂"
                                                textColor:FirstTextColor
                                                     font:15
                                              isSizetoFit:NO
                                            textAlignment:NSTextAlignmentLeft];
    self.titleLable = titleLable;
    [self addSubview:self.titleLable];
    
    
    STLabel * desLable = [[STLabel alloc] initWithFrame:CGRectMake(self.iconButton.right + 10,titleLable.bottom, UIScreenWidth - self.iconButton.right, 50)
                                                   text:@"地址:成都市\n天府五街地铁口"
                                              textColor:SecendTextColor
                                                   font:15
                                            isSizetoFit:NO
                                          textAlignment:NSTextAlignmentLeft];
    self.desLable = desLable;
    [self addSubview:self.desLable];
    
    
    STLabel * timeLable = [[STLabel alloc] initWithFrame:CGRectMake(self.iconButton.right+10,self.desLable.bottom, UIScreenWidth - self.iconButton.right, 30)
                                                    text:@"创建时间:2018年03月23日"
                                               textColor:SecendTextColor
                                                    font:12
                                             isSizetoFit:NO
                                           textAlignment:NSTextAlignmentLeft];
    self.timeLable = timeLable;
    [self addSubview:self.timeLable];
    
    self.mangeButton = [[STButton alloc] initWithFrame:CGRectMake(0, 0, 80, 30)
                                                 title:@"管理"
                                            titleColor:[UIColor whiteColor]
                                             titleFont:14
                                          cornerRadius:4
                                       backgroundColor:TM_redColor
                                       backgroundImage:nil
                                                 image:nil];
    self.mangeButton.contentHorizontalAlignment = UIControlContentHorizontalAlignmentCenter;
    self.mangeButton.bottom = [[self class] cellHeight]/2 - 8;
    self.mangeButton.right = UIScreenWidth - 15;
    [self addSubview:self.mangeButton];
    
    self.delButton = [[STButton alloc] initWithFrame:CGRectMake(0, 0, 80, 30)
                                               title:@"删除"
                                          titleColor:[UIColor whiteColor]
                                           titleFont:14
                                        cornerRadius:4
                                     backgroundColor:TM_buttonBackGroundColor
                                     backgroundImage:nil
                                               image:nil];
    self.delButton.contentHorizontalAlignment = UIControlContentHorizontalAlignmentCenter;
    self.delButton.top = [[self class] cellHeight]/2 + 8;
    self.delButton.right = UIScreenWidth - 15;
    [self addSubview:self.delButton];
}

@end


